﻿<!DOCTYPE html>
<html>
<head>
    <title>CGI</title>
</head>
<body>
    <h1>Our Page</h1>

    <script>
        //01
        var value = parseInt('1234');
        console.log(value);

        //02
        //var value = parseInt('b1234');
        //console.log(value);

        //03
        //var value = parseInt('12z34');
        //console.log(value);

        //04
        //var value = parseInt('1234.9');
        //console.log(value);

        //05
        //var value = parseInt(' ');
        //console.log(value);

        //06
        //var value = parseFloat('123.9');
        //console.log(value);

        //07
        //var value = parseFloat('z123.9');
        //console.log(value);

        //08
        //var value = isNaN(NaN);
        //console.log(value);

        //09
        //9/0 = infinity and infinity is not a number
        //var value = isNaN(9 / 0);
        //console.log(value);

        //10
        //var path = "\\start\\";
        //console.log(encodeURI(path));

        //11 + is not encoded
        //var path = "\\start\\+";
        //console.log(encodeURI(path));

        //12 to encode +, encodeURIComponent need to use
        //var path = "\\start\\+";
        //console.log(encodeURIComponent(path));

        //13
        //var path = "%5Cstart%5C+";
        //console.log(decodeURI(path));

        //14
        //var path = "%5Cstart%5C%2B";
        //console.log(decodeURIComponent(path));

        //15
        //var globalVar='foo';
        //var code = 'console.log(globalVar);'
        //eval(code);
    </script>
</body>
</html>